/*
 * Copyright 2008. Mount Sinai Hospital, Toronto, Canada.
 * 
 * Licensed under the Apache License, Version 2.0. You
 * can find a copy of the license at:
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * IN NO EVENT SHALL MOUNT SINAI HOSPITAL BE LIABLE TO ANY PARTY FOR DIRECT, 
 * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST 
 * PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, 
 * EVEN IF MOUNT SINAI HOSPITAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 
 * DAMAGE.
 * 
 * MOUNT SINAI HOSPITAL SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF 
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND 
 * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". 
 * MOUNT SINAI HOSPITAL HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 
 * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 
 */

package com.sinai.mshab.format;

import com.google.gwt.junit.client.GWTTestCase;

public class GwtTestFormatPanel extends GWTTestCase {

	private FormatPanel formatPanel;
	
	@Override
	protected void gwtSetUp() throws Exception {
		super.gwtSetUp();
		formatPanel = new FormatPanel();
	}

	public void testAddValidator() {

//		TextBox textBox = new TextBox();
//		Validator<TextBox> textBoxValidator = new MockValidator();
//		formatPanel.addValidator(textBox, textBoxValidator);
//		
//		// make sure the widget was added to the formatPanel.
//		assertEquals(textBox, textBoxValidator.getWidget());
//		
//		// make sure that formatPanel is an observer of the validator.
//		assertEquals(1, textBoxValidator.countObservers());
//		textBoxValidator.deleteObserver(formatPanel);
//		assertEquals(0, textBoxValidator.countObservers());
	}
	
	@Override
	public String getModuleName() {
		return "com.sinai.mshab.mshabFormat";
	}

}
